/**
 * Created by bian on 16-3-26.
 */
/**
 * 原始的回调函数式回力鏢风格代码
 * */
var http = require('http');
http.get('http://www.baidu.com', function(data){
    //do something to data
    console.log('doing something to data ,this is callback 1:' + data.statusCode);
    //get result of resolve data
    http.get('http://www.baidu.com', function(data){
        //do something to data
        console.log('doing something to data ,this is callback 2:' + data.statusCode);
        //get result of resolve data
        http.get('http://www.baidu.com', function(data){
            console.log('doing something to data ,this is callback 3:' + data.statusCode);
            http.get('http://www.baidu.com', function(data){
                console.log('doing something to data ,this is callback 4:' + data.statusCode);
                http.get('http://www.baidu.com', function(data){
                    console.log('doing something to data ,this is callback 5:' + data.statusCode);
                    http.get('http://www.baidu.com', function(data){
                        console.log('doing something to data ,this is callback 6:' + data.statusCode);
                    });
                });
            });
        });
    });
});